//
//  RBKGoodsCell.m
//  RuiBeiKang
//
//  Created by 江伟 on 2018/11/27.
//  Copyright © 2018年 JW. All rights reserved.
//

#import "RBKGoodsCell.h"

@implementation RBKGoodsCell
- (void)setModel:(RBKGoodsModel *)model {
    _model = model;
    [self.imgView sd_setImageWithURL:[NSURL URLWithString:kImgAllUrl(_model.pic)] placeholderImage:DefalutImage];
    self.nameLab.text = _model.name;
    self.descripLab.text = _model.descrip;
    self.currentPriceLab.text = SF(@"￥%@",_model.currentPrice);
    self.normalPriceLab.text = SF(@"￥%@", _model.normalPrice);
    self.numberLab.text  = SF(@"已热销：%@",_model.soldNumber);
    self.currentPriceLab.attributedText = [Functions attributedStringWithText:self.currentPriceLab.text aStr:@"￥" color:nil font:R_Font(14)];
}

- (void)setupSimulatData {
    self.imgView.image = DefalutImage;
    self.nameLab.text = @"大豆磷脂胶囊300粒/瓶";
    self.descripLab.text = @"缓解三高，远离脑梗、脂肪肝";
    self.currentPriceLab.text = @"￥668";
    self.normalPriceLab.text = @"￥668";
    self.numberLab.text  = @"已热销：1128";
    self.currentPriceLab.attributedText = [Functions attributedStringWithText:self.currentPriceLab.text aStr:@"￥" color:nil font:R_Font(14)];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

@end
